#ifndef DATACLASS_H
#define DATACLASS_H

#include <QMainWindow>
#include <QObject>

class DataClass : public QObject
{
    Q_OBJECT
public:

    explicit DataClass(QObject *parent = nullptr);

    int index0,index1,index2,index3,index4,index5,index6,index7,index8,index9,indexA,indexB;
    int indexGPS,indexP,indexR;

    int max, min;

    float pitch[1000],roll[1000];
    float pitchCa[1000],rollCa[1000];
    unsigned char gpsInformation[10000];

    int dataVector0[20000000],dataVector1[20000000],dataVector2[20000000];
    int dataVector3[20000000],dataVector4[20000000],dataVector5[20000000];//一亿个点
    int dataVector6[20000000],dataVector7[20000000],dataVector8[20000000];
    int dataVector9[20000000],dataVectorA[20000000],dataVectorB[20000000];

    int indData[7882];

    int maxData0[7882],maxData1[7882],maxData2[7882],maxData3[7882],maxData4[7882],maxData5[7882];
    int maxData6[7882],maxData7[7882],maxData8[7882],maxData9[7882],maxDataA[7882];

//    int minData0[7882],minData1[7882],minData2[7882],minData3[7882],minData4[7882],minData5[7882];
//    int minData6[7882],minData7[7882],minData8[7882],minData9[7882],minDataA[7882];


signals:

public slots:
    void txt2dataV(char *filePath);
    void initializeMaxMin();
    void findMaxMin(int *dataVector,int beginN, int sizeMe);
    void findMaxMinData(int begin, int end, bool *flag);
};

#endif // DATACLASS_H
